package com.kang.controller;

import com.kang.Vo.MenusVo;
import com.kang.commons.Result;
import com.kang.service.MenusService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @program: photo_fawu
 * @description:
 * @author: K.faWu
 * @create: 2021-11-15 16:41
 **/
@RestController
@RequestMapping("menus")
public class MenusController {
    @Autowired
    private MenusService menusService;

    @GetMapping
    public Result<?> getAll(){
        List<MenusVo> list = menusService.getAll();
        return Result.success(list);
    }
}
